<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>迁移任务</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="assets/libs/layui/css/layui.css">
    <link rel="stylesheet" href="assets/css/scroll-bar.css">
    <link rel="stylesheet" href="assets/css/sub-page.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_693759_hsptnwurztv.css">
</head>
<body>
<div class="ok-body">
    <!--面包屑导航区域-->
    <div class="ok-body-breadcrumb">
            <span class="layui-breadcrumb">
                <a><cite>首页</cite></a>
                <a><cite>数据迁移</cite></a>
                <a><cite>迁移任务</cite></a>
            </span>
        <a class="layui-btn layui-btn-small" href="javascript:location.replace(location.href);" title="刷新">
            <i class="layui-icon layui-icon-refresh"></i>
        </a>
    </div>

    <table class="layui-hide" id="migration-list" lay-filter="migration_list"></table>
</div>
<script src="assets/libs/layui/layui.js"></script>
<script>
    layui.config({
        base: 'module/',
        version: true,
        debug: true
    }).use(['table','config', 'crown'], function () {
        var table = layui.table;
        var config = layui.config;

        table.render({
            elem: '#migration-list',
            page: true,
            request: config.request,
            parseData: config.parseData,
            response: config.response,
            cellMinWidth: 80,
            width: '80%',
            url: '/task/migtables/${taskId}',
            cols: [[
                {field: 'tableName', align: 'center', width:160, title: '表名'},
                {field: 'sourceDb', align: 'center', width: 120, title: '源库'},
                {field: 'targetDb', align: 'center', width: 120, title: '目标库'},
                {field: 'rows', align: 'center', width: 120, title: '预估总数'},
                {field: 'readRecords', align: 'center', width: 120, title: '已完成'},
                {field: 'writeFail', align: 'center', width: 120, title: '失败数'},
                {field: 'costTime', align: 'center', width: 120, title: '耗时'},
                {field: 'status', align: 'center', title: '状态'}
            ]]
        });
    });
</script>

</body>
</html>